/*
    test_aminoacids_distances.cpp.
    Copyright (C) 2012  Daniel Gutson, Favio Bettiol, FuDePAN

    This file is part of Biopp.

    Biopp is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Biopp is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Biopp.  If not, see <http://www.gnu.org/licenses/>.

    NOTE: This file is in prototype stage, and is under active development.
*/

#include <iostream>
#include "biopp/biopp.h"

using namespace std;
using namespace biopp;

static void showHeader()
{
    for (AminoacidsIterator amino = GeneticCode::allAminoacids(); !amino.end(); ++amino)
    {
        cout << "\t" << *amino;
    }
    cout << endl;
}

int main()
{
    showHeader();
    for (AminoacidsIterator amino1 = GeneticCode::allAminoacids(); !amino1.end(); ++amino1)
    {
        cout << *amino1;
        for (AminoacidsIterator amino2 = GeneticCode::allAminoacids(); !amino2.end(); ++amino2)
        {
            cout << "\t";
            if (*amino1 == *amino2)
                cout << 0;
            else
            {
                size_t max_dist = 0;
                for (TripletsIterator t1 = GeneticCode::triplets(*amino1); !t1.end(); ++t1)
                    mili::maximize(max_dist, t1->min_distance(*amino2));
                cout << max_dist;
            }
        }
        cout << endl;
    }
    return 0;
}



